package com.easy.cms.material.repository;

import com.easy.cms.material.model.OrderMain;
import com.easy.cms.material.model.OrderSub;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface OrderRepository extends JpaRepository<OrderMain, Long> {
    // 根据主订单编号查询订单
    OrderMain findByMainOrderNumber(String mainOrderNumber);

    // 根据主订单编号查询子订单列表
    java.util.List<OrderSub> findSubOrdersByMainOrderNumber(String mainOrderNumber);
}